package com.citcc.business.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.citcc.business.bean.CdzRates;
import com.citcc.business.mapper.CdzRatesMapper;

@Service
public class CdzRatesService {

    private final CdzRatesMapper cdzRatesMapper;

    @Autowired
    public CdzRatesService(CdzRatesMapper cdzRatesMapper){
        this.cdzRatesMapper=cdzRatesMapper;
    }

    public List<CdzRates> selectAllList(CdzRates rates){
        return cdzRatesMapper.selectAllList(rates);
    }

    public int add(CdzRates rates){
        return cdzRatesMapper.insertSelective(rates);
    }

    public int update(CdzRates rates){
        return cdzRatesMapper.updateByPrimaryKeySelective(rates);
    }

    public int delete(String id){
        return cdzRatesMapper.deleteByPrimaryKey(id);
    }

    public CdzRates getCdzRates(String id){
        return cdzRatesMapper.selectByPrimaryKey(id);
    }

}
